<template>
  <div>
    <!-- 搜索区域 -->
    <el-row :gutter="20">
      <el-col :span="8">
        <el-input
          clearable
          placeholder="请输入内容"
          class="input-with-select"
          v-model="queryinfo.queryString"
        >
          <el-button slot="append" icon="el-icon-search" @click="searchGoodList"></el-button>
        </el-input>
      </el-col>
      <!-- <el-col :span="4">
        <el-button type="primary" @click="goAdd">添加商品</el-button>
      </el-col>-->
    </el-row>

    <!-- table 表格区域 -->
    <el-table :data="goodslist" border stripe>
      <el-table-column type="index"></el-table-column>
      <el-table-column label="商品名称" prop="name" width="440"></el-table-column>
      <el-table-column label="商品价格(元)" prop="money" width="220"></el-table-column>
      <!-- <el-table-column label="商品价格(CY)" prop="cymoney" width="95"></el-table-column> -->
      <!-- <el-table-column label="商品重量" prop="goods_weight" width="70"></el-table-column> -->
      <el-table-column label="创建时间" prop="createTime">
        <!-- <template slot-scope="scope">
          {{scope.row.beginTime | dateFormat}}
        </template>-->
      </el-table-column>
      <el-table-column label="商品分类" prop="remark"></el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button type="primary" size="mini" @click="goEdit(scope)">编辑</el-button>
          <el-button
            v-if="scope.row.status!=0"
            type="danger"
            size="mini"
            @click="remove(scope)"
          >{{scope.row.status==1?'下架':scope.row.status==2?'上架':''}}</el-button>
          <!-- scope.row.status==0?'审核中': -->
        </template>
      </el-table-column>
    </el-table>

    <!-- 分页区域 -->
    <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="queryinfo.pagenum"
      :page-sizes="[10, 15, 20, 30]"
      :page-size="queryinfo.pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    ></el-pagination>

  </div>
</template>

<script>
import mix from "./List-mixins.js";
export default {
  mixins: [mix],
};
</script>

<style lang="less" scoped>
</style>
